/*
 * @Author: 刘润泽
 * @Date: 2023-02-22 19:39:56
 * @LastEditors: 刘润泽
 * @LastEditTime: 2023-03-07 09:48:58
 * @Description: 
 */
package server.business.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import server.business.service.BloodDispenseStatesService;
import server.business.utils.Result;
import server.business.pojo.BloodDispenseStates;

@Controller
@RequestMapping("/bloodDispenseStates")
public class BloodDispenseStatesController {

    @Autowired
    private BloodDispenseStatesService bloodDispenseStatesService;

    /**
     * 查询配血状态
     * 
     * @return
     */
    @RequestMapping("/normal/queryBloodDispenseStates")
    @ResponseBody
    public Result queryBloodDispenseStates() {
        bloodDispenseStatesService.list();
        Result result = new Result();
        result.setData(bloodDispenseStatesService.list());
        return result;
    }

    @GetMapping(value = "/normal/getState")
    @ResponseBody
    public server.business.utils.results.lrz.Result getState() {
        List<BloodDispenseStates> bloodDispenseStateList = bloodDispenseStatesService.list();
        return server.business.utils.results.lrz.Result.success(bloodDispenseStateList);
    }

    /**
     * lrz
     * 
     * @return
     */
    @GetMapping(value = "/normal/getName")
    @ResponseBody
    public server.business.utils.results.lrz.Result getName() {
        List<BloodDispenseStates> bloodDispenseStateList = bloodDispenseStatesService.list();
        return server.business.utils.results.lrz.Result.success(bloodDispenseStateList);
    }

}
